# vim: filetype=yaml sw=2
version: 115.0
git_hash: 78ab4ce85120f45a4b67b055936e401193eabd68
git_url: https://github.com/mozilla/application-services
git_submodule: 1
container:
  use_container: 1

var:
  # This should be updated when the list of gradle dependencies is changed.
  gradle_dependencies_version: 10
  gradle_version: 7.6.1
  glean_parser: 7.1.0
  ndk_version: 25c
  ndk_version_build: 25.2.9519653
  nss_version: 3.88.1
  nspr_version: '4.35'
  sqlcipher_version: 4.5.4

steps:
  build:
    filename: '[% project %]-[% c("version") %]-[% c("var/build_id") %].tar.[% c("compress_tar") %]'
    var:
      arch_deps:
        # Needed to build nss and sqlcipher
        - gyp
        - tcl
    input_files:
      - project: container-image
        pkg_type: build
      - project: '[% c("var/compiler") %]'
        name: '[% c("var/compiler") %]'
        pkg_type: build
      # application-services is the only project for which we use a more recent
      # NDK than GeckoView. So, download it here, rather than adding 1.5-2GB to
      # each other Android project.
      - URL: 'https://dl.google.com/android/repository/android-ndk-r[% c("var/ndk_version") %]-linux.zip'
        name: android_ndk
        sha256sum: 769ee342ea75f80619d985c2da990c48b3d8eaf45f48783a2d48870d04b46108
      - project: gradle
        name: gradle
        pkg_type: build
      - project: rust
        name: rust
        pkg_type: build
      - project: ninja
        name: ninja
        pkg_type: build
      # See libs/build-all.sh to update these!
      # Also, build them with application-services, since they need the NDK and
      # we are using a different one from the other projects.
      - URL: 'https://ftp.mozilla.org/pub/security/nss/releases/NSS_[% c("var/nss_version") | replace("\\.", "_") %]_RTM/src/nss-[% c("var/nss_version") %]-with-nspr-[% c("var/nspr_version") %].tar.gz'
        name: nss
        sha256sum: fcfa26d2738ec5b0cf72ab4be784eac832a75132cda2e295799c04d62a93607a
      - URL: 'https://www.zetetic.net/sqlcipher/verify/[% c("var/sqlcipher_version") %]/sqlcipher-[% c("var/sqlcipher_version") %].zip'
        name: sqlcipher
        sha256sum: bb333b1dfa58d66634f263328a81d07d96395ca17f4e147ede4b723ea83ce5f8
      - filename: 'gradle-dependencies-[% c("var/gradle_dependencies_version") %]'
        name: gradle-dependencies
        exec: '[% INCLUDE "fetch-gradle-dependencies" %]'
        enable: '[% !c("var/fetch_gradle_dependencies") %]'
      - URL: '[% pc("glean", "var/glean_wheels_url/" _ c("var/glean_parser"), { error_if_undef => 1 }) %]'
        name: glean-wheels
        sha256sum: '[% pc("glean", "var/glean_wheels_sha256sum/" _ c("var/glean_parser"), { error_if_undef => 1 }) %]'
        enable: '[% !c("var/fetch_gradle_dependencies") %]'
      - name: cargo_vendor
        project: application-services
        pkg_type: cargo_vendor
        norec:
          sha256sum: 391e5ca72bfd0a66b0e821fe7c264567602853d4293cd3db39932184002419f2
      - filename: no-git.patch
      - filename: local-repository.diff
        enable: '[% !c("var/fetch_gradle_dependencies") %]'
      - filename: gen_gradle_deps_file.sh
        enable: '[% c("var/fetch_gradle_dependencies") %]'
      - filename: bug_13028.patch
      - filename: apply-bug-13028.diff
      # Delete when this patch is included upstream
      - filename: bug40485.diff

  list_toolchain_updates:
    git_hash: 'v[% c("version") %]'
    input_files: []
    container:
      use_container: 0

  get_gradle_dependencies_list:
    filename: 'gradle-dependencies-list-[% c("version") %].txt'
    get_gradle_dependencies_list: '[% INCLUDE build %]'
    var:
      fetch_gradle_dependencies: 1
